package com.example.demo.mapper;


import com.example.demo.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    /**
     * 查询所有用户
     * @return
     */
    @Select("select id,username,password from user")
    List<User> getAllUser();


    @Select("select id,username,password from user where username=#{username}")
    User getUserByUsername(String username);
}
